Skip to content

fix: refuse unsupported modules.shell and spaced init entries; literal export - #31

Merged
HaoZeke merged 3 commits into
mainfrom
fix/modules-validation
Nov 17, 2026
Merged

HaoZeke merged 3 commits into
mainfrom
fix/modules-validation

Conversation

@HaoZeke

@HaoZeke HaoZeke commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

The module wrapper is a POSIX-shell script: it splits the unquoted EB_PIPELINE_MODULES at white space, under set -f. modules.shell took any string. zsh ran the script without splitting, so the modules of modules.init reached one module load as a single name, and csh, tcsh and fish failed to parse it when a step started.

site::validate now accepts sh, bash, dash, ash, ksh, ksh93, mksh and yash, matched on the file name of the value so that a path works too, and reports any other shell, so check and every other command that loads the site file refuse it. Each of those shells ran the wrapper here, and the wrapper test now runs a build through every one of them that is installed, bash and sh at least.

The entries of modules.init reach the module wrapper joined with spaces in EB_PIPELINE_MODULES, and the wrapper splits that at white space. An entry with white space in it loaded as several modules: a pasted line, module load EasyBuild, loaded module, load and EasyBuild. An entry is now one module name, and site::validate reports an entry with white space.

ox-rst formats ~code~, =verbatim= and inline source blocks with its verb markup, which writes each leading * as \* inside a reStructuredText literal. A literal takes no backslash escapes, so the log rotation page showed *.log and *.txt as \*.log and \*.txt. docs/export.el now puts the plain literal format for code and verbatim ahead of ox-rst's own entries in org-rst-text-markup-alist. Exported before and after, the whole site differs only in the line of the log rotation page that holds those two literals. docs/tools/test_export.py exports a page of literals and checks each one; docbld depends on it. export.el is the documentation template's file; the template and the eessi-arch-guard docs carry the same file and need the same change.

The module wrapper is a script for a POSIX shell: it splits the unquoted
EB_PIPELINE_MODULES at white space, under set -f. modules.shell took any
string. zsh ran the script without splitting, so the modules of
modules.init reached one module load as a single name, and csh, tcsh
and fish failed to parse it when a step started.

site::validate now accepts sh, bash, dash, ash, ksh, ksh93, mksh and
yash, matched on the file name of the value so that a path works too,
and reports anything else, so check and every other command that loads
the site file refuse it. Each of those shells ran the wrapper here, and
the wrapper test now runs a build through every one of them that is
installed, bash and sh at least.

The schema text, the site file and environment references, and the
failures of the site file how-to say which shells are accepted, the
last with the message from docs/examples/site-file.sh.
The entries of modules.init reach the module wrapper joined with spaces
in EB_PIPELINE_MODULES, and the wrapper splits that at white space. An
entry with white space in it loaded as several modules: a pasted line,
"module load EasyBuild", loaded module, load and EasyBuild.

An entry is now one module name, and site::validate reports an entry
with white space, so check and every other command that loads the site
file refuse it. That follows how init lines are written, with white
space between module names and none inside one. Lmod and Environment
Modules would load a quoted name with a space, but EB_PIPELINE_MODULES,
joined with spaces, cannot carry one, and loading the entry whole would
turn a pasted line into a module load that fails at run time. The
templates and the site files of the docs give one name per entry and
still pass.

The schema text, the site file and environment references, and the
failures of the site file how-to describe the rule, the last with the
message from docs/examples/site-file.sh.
ox-rst formats ~code~, =verbatim= and inline source blocks with its verb
markup, which writes each leading * as \* inside a reStructuredText
literal. A literal takes no backslash escapes, so the log rotation page
showed *.log and *.txt as \*.log and \*.txt.

docs/export.el now puts the plain ``%s`` format for code and verbatim
ahead of ox-rst's own entries in org-rst-text-markup-alist. Exported
before and after, the whole site differs only in the line of the log
rotation page that holds those two literals.

docs/tools/test_export.py exports a page of literals with export.el in
a scratch directory and reads the result with docutils: each literal
must match its Org text. The pixi task exporttest runs it, docbld
depends on it, and the contributing page lists it.

export.el is the documentation template's file; the template and the
eessi-arch-guard docs carry the same file and need the same change.
@HaoZeke
HaoZeke merged commit f76a2d1 into main Nov 17, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant